﻿//-----------------------------------------------------------------
//
// @(#)$Id: Users.aspx.cs,v 1.0 2013/12/16 9:53:38 lichunhua Exp $
// @(#)$Author: lichunhua  $
// @(#)$Date: 2013/12/16 9:53:38 $
// @(#)$Description:
//
//
//
//                 All Rights Reserved.
//-----------------------------------------------------------------
using System;
using ebay.Dal;
using ebay.Dal.CenterDB_SystemTableAdapters;

public partial class UI_SysSet_Users : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        WebUtility.CheckRight();
        if (!IsPostBack)
        {
            //string Id = Request.QueryString["Id"];
            //if (!string.IsNullOrEmpty(Id))
            //{
            //    Response.Write(Delete(Id));
            //    Response.End();
            //    Response.Flush();
            //    return;
            //}
            Bind();
        }
    }
    void Bind()
    {
        T_UsersTableAdapter adapter = new T_UsersTableAdapter();
        Repeater1.DataSource = adapter.GetData();
        Repeater1.DataBind();
    }
    //string Delete(string UserId)
    //{
    //    //T_UsersTableAdapter adapter = new T_UsersTableAdapter();
    //    //return adapter.Delete(UserId).ToString();
    //}
    protected void btnSync_Click(object sender, EventArgs e)
    {
        if (Session["UserId"] != null)
        {
            Users u = new Users();
            u.SyncUsersFromK3(Session["UserId"].ToString());
            Bind();
        }
        else
        {
            WebUtility.ShowMsg("您还没有登陆或登录超时,请重新登陆", this);
        }
    }
}